home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / include / user / RCS / sprite.h,v < prev    next >
Encoding:
Text File  |  1992-07-17  |  3.6 KB  |  175 lines

  1. head     1.3;
  2. branch   ;
  3. access   ;
  4. symbols  srv030:1.3 srv027:1.3 srv026:1.3 srv024:1.3 srv021:1.3 srv019:1.3 srv018:1.3 srv016:1.3 srv014:1.3 srv010:1.3 srv008:1.3 srv007:1.3 srv006:1.3 srv005:1.3 srv004:1.2 srv003:1.2 srv002:1.2 srv001:1.2;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.3
  10. date     92.05.12.11.54.30;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.2;
  13.  
  14. 1.2
  15. date     91.08.21.14.09.26;  author kupfer;  state Exp;
  16. branches ;
  17. next     1.1;
  18.  
  19. 1.1
  20. date     91.08.21.14.07.57;  author kupfer;  state Exp;
  21. branches ;
  22. next     ;
  23.  
  24.  
  25. desc
  26. @@
  27.  
  28.  
  29. 1.3
  30. log
  31. @Make NIL be -1 for user code.
  32. @
  33. text
  34. @/*
  35.  * sprite.h --
  36.  *
  37.  * Common constants and type declarations for Sprite.
  38.  *
  39.  * Copyright 1985, 1988 Regents of the University of California
  40.  * Permission to use, copy, modify, and distribute this
  41.  * software and its documentation for any purpose and without
  42.  * fee is hereby granted, provided that the above copyright
  43.  * notice appear in all copies.  The University of California
  44.  * makes no representations about the suitability of this
  45.  * software for any purpose.  It is provided "as is" without
  46.  * express or implied warranty.
  47.  *
  48.  * $Header: /user5/kupfer/spriteserver/include/user/RCS/sprite.h,v 1.2 91/08/21 14:09:26 kupfer Exp Locker: kupfer $ SPRITE (Berkeley)
  49.  */
  50.  
  51. #ifndef _SPRITE
  52. #define _SPRITE
  53.  
  54. #include "cfuncproto.h"
  55. /*
  56.  * A boolean type is defined as an integer, not an enum. This allows a
  57.  * boolean argument to be an expression that isn't strictly 0 or 1 valued.
  58.  */
  59.  
  60. #ifndef TRUE
  61. #define TRUE    1
  62. #endif
  63. #ifndef FALSE
  64. #define FALSE    0
  65. #endif
  66.  
  67. #ifndef _ASM
  68. typedef int Boolean;
  69.  
  70. /*
  71.  * Functions that must return a status can return a ReturnStatus to
  72.  * indicate success or type of failure.
  73.  */
  74.  
  75. typedef int  ReturnStatus;
  76. #endif /* _ASM */
  77.  
  78. /*
  79.  * The following statuses overlap with the first 2 generic statuses 
  80.  * defined in status.h:
  81.  *
  82.  * SUCCESS            There was no error.
  83.  * FAILURE            There was a general error.
  84.  */
  85.  
  86. #define    SUCCESS            0x00000000
  87. #define    FAILURE            0x00000001
  88.  
  89.  
  90. /*
  91.  * A nil pointer must be something that will cause an exception if
  92.  * referenced.  In native Sprite there are two nils: the kernel's nil
  93.  * and the nil used by user processes.  In the Sprite server these two
  94.  * are the same.  
  95.  * XXX Unfortunately, there's some user code that knows about NIL and knows 
  96.  * that it's set to -1.  Maybe it would be better to make NIL -1 for the 
  97.  * server, too.
  98.  */
  99.  
  100. #ifdef SPRITED
  101. #define NIL         0
  102. #else
  103. #define NIL        0xFFFFFFFF
  104. #endif
  105. #define USER_NIL     0
  106. #ifndef NULL
  107. #define NULL         0
  108. #endif
  109.  
  110. #ifndef _ASM
  111. /*
  112.  * An address is just a pointer in C.  It is defined as a character pointer
  113.  * so that address arithmetic will work properly, a byte at a time.
  114.  */
  115.  
  116. typedef char *Address;
  117.  
  118. /*
  119.  * ClientData is an uninterpreted word.  It is defined as an int so that
  120.  * kdbx will not interpret client data as a string.  Unlike an "Address",
  121.  * client data will generally not be used in arithmetic.
  122.  */
  123.  
  124. #ifndef _CLIENTDATA
  125. typedef int *ClientData;
  126. #define _CLIENTDATA
  127. #endif
  128.  
  129. #ifndef __STDC__
  130. #define volatile
  131. #define const
  132. #endif
  133.  
  134. extern void panic();
  135.  
  136. #endif /* !_ASM */
  137.  
  138. #endif /* _SPRITE */
  139. @
  140.  
  141.  
  142. 1.2
  143. log
  144. @Make NIL the same as NULL.
  145. @
  146. text
  147. @d15 1
  148. a15 1
  149.  * $Header: /user6/kupfer/spriteserver/include/RCS/sprite.h,v 1.1 91/08/21 14:07:57 kupfer Exp Locker: kupfer $ SPRITE (Berkeley)
  150. d61 4
  151. a64 1
  152.  * are the same.
  153. d67 1
  154. d69 3
  155. @
  156.  
  157.  
  158. 1.1
  159. log
  160. @Initial revision
  161. @
  162. text
  163. @d15 1
  164. a15 1
  165.  * $Header: /sprite/src/lib/include/RCS/sprite.h,v 1.10 90/12/05 14:55:08 ouster Exp $ SPRITE (Berkeley)
  166. d58 4
  167. a61 3
  168.  * A nil pointer must be something that will cause an exception if 
  169.  * referenced.  There are two nils: the kernels nil and the nil used
  170.  * by user processes.
  171. d64 1
  172. a64 1
  173. #define NIL         0xFFFFFFFF
  174. @
  175.